/**
 * TmMenu.js
 *
 * @description :: TODO: You might write a short summary of how this model works and what it represents here.
 * @docs        :: http://sailsjs.org/#!documentation/models
 */

module.exports = {

	attributes : {
		
		name : {
			type : 'string',
			required : true
		},

		/*pid : {
			type : 'string',
			defaultsTo:null
		},*/

		order : {
			type : 'integer',
		},

		icon : {
			type : 'string',
		},
		
		link : {
			type : 'string',
		},
		
		logo : {
			type : 'string',
		},
		
		parent : {
			model : 'TmMenu',
			defaultsTo:null
		},
		
		children : {
			collection : 'TmMenu',
			via : 'parent'
		},
	}
};
